 /*************************************************************************
	* Copyright(C),2017,ZDC Corporation.
	* All right reserved.
	* 
	* File Name: connect.c
	* Description:
	* Author: mdc
	* Mail: 1436208384@qq.com
	* Created Time: 2017年09月21日 星期四 15时14分55秒
 ************************************************************************/

#include "connect.h"
int main(int argc, char *argv[])
{
    pthread_t pid;
    int res;

/*    //初始化互斥锁
    if (0 != (res = pthread_mutex_init(&work_mutex, NULL)))
    {
        perror("pthread_mutex_init");
        exit(-1);
    }

    
    sleep(1);
    //创建线程
    if (0 != (res = pthread_create(&pid,NULL,tcpserver,NULL)))
    {
        printf("Create thread failed\n");
        exit(res);
    }
    
  */  sleep(1);
    tcpclient();
    //等待线程结束
    /*if (0 == (res = pthread_join(pid,NULL)))
    {
        printf("Thread joined\n");
    }*/

    return 0;

}
